﻿package ascript.components.collision
{
	//#########################
	// Header Includes
	//#########################
	import ascript.GameObject;
	import Box2D.Dynamics.b2Body;
	import Box2D.Dynamics.b2Fixture;
	
	//#########################
	// GeneralModifiers Class
	//#########################
	public class CollisionPickup extends CollisionBase
	{
		//=========================
		// Constructors
		//=========================	
		public function CollisionPickup():void
		{
		}
		
		//=========================
		// Members
		//=========================
		override public function handleCollision( tObject:GameObject, tObjectHit:GameObject, tFixture:b2Fixture, tFixtureHit:b2Fixture, tIsTouching:Boolean ):Boolean
		{
			// Inheritance
			if ( super.handleCollision( tObject, tObjectHit, tFixture, tFixtureHit, tIsTouching ) )
			{
				tObject.setAttribute( "CollisionIsEnabled", false );
			}
			
			return true;
		}
		
		override public function solveCollision( tObject:GameObject, tObjectHit:GameObject, tFixture:b2Fixture, tFixtureHit:b2Fixture, tIsPresolve:Boolean ):Boolean
		{
			// DONT CARE
			return false;
		}
	}
}